Sleepable Read-Copy Update

نویسنده

  • Paul E. McKenney
چکیده

Read-copy update (RCU) is a synchronization API that is sometimes used in place of reader-writer locks. RCU’s read-side primitives offer extremely low overhead and deterministic execution time. These properties imply that RCU updaters cannot block RCU readers, which means that RCU updaters can be expensive, as they must leave old versions of the data structure in place to accommodate pre-existing readers. Furthermore, these old versions must be reclaimed after all pre-existing readers complete. The Linux kernel offers a number of RCU implementations, the first such implementation being called “Classic RCU”. Classic RCU requires that read-side critical sections obey the same rules obeyed by the critical sections of pure spinlocks: blocking or sleeping of any sort is strictly prohibited. This has frequently been an obstacle to the use of RCU, and Paul has received numerous requests for a “sleepable RCU” (SRCU) that permits arbitrary sleeping (or blocking) within RCU read-side critical sections. Paul had previously rejected all such requests as unworkable, since arbitrary sleeping in RCU read-side could indefinitely extend grace periods, which in turn could result in arbitrarily large amounts of memory awaiting the end of a grace period, which finally would result in disaster, as fancifully depicted in Figure 1, with the most likely disaster being hangs due to memory exhaustion. After all, any concurrency-control primitive that could result in system hangs — even when used correctly – does not deserve to exist. However, the realtime kernels that require spinlock Figure 1: Sleeping While RCU Reading Considered Harmful

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

On Extending the Primary-copy Database Replication Paradigm

In database replication, primary-copy systems sort out easily the problem of keeping replicate data consistent by allowing only updates at the primary copy. While this kind of systems are very efficient with workloads dominated by read-only transactions, the update-everywhere approach is more suitable for heavy update loads. However, it behaves worse when dealing with workloads dominated by rea...

متن کامل

Relativistic Causal Ordering - A Memory Model for Scalable Concurrent Data Structures

High-performance programs and systems require concurrency to take full advantage of available hardware. However, the available concurrent programming models force a difficult choice, between simple models such as mutual exclusion that produce little to no concurrency, or complex models such as Read-Copy Update that can scale to all available resources. Simple concurrent programming models enfor...

متن کامل

Using Read-Copy-Update Techniques for System V IPC in the Linux 2.5 Kernel

Read-copy update (RCU) allows lock-free read-only access to data structures that are concurrently modified on SMP systems. Despite the concurrent modifications, read-only access requires neither locks nor atomic instructions, and can often be written as if the data were unchanging, in a “CS 101” style. RCU is typically applied to read-mostly linked structures that the read-side code traverses u...

متن کامل

Open Questions Surrounding RCU

Read-copy update (RCU) is a light-weight synchronization mechanism that has been used in production for well over a decade, most recently, as part of the Linux kernel. Although RCU is well-understood in the sense that practitioners are able to make good use of it without special training, there are a number of intriguing open questions related to RCU. This paper introduces a number of such ques...

متن کامل

RCU Usage In the Linux Kernel: One Decade Later

Read-copy update (RCU) has been used in the Linux kernel for more than a decade, raising the question of exactly what it is used for. To answer this question, we briefly survey use of RCU in the Linux kernel, addressing the why, where, and how of its usage. This document also includes a novel graphical depiction of the relationships among several patterns of RCU usage.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008